package com.cheer.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author lx
 */
@Component
class PermissionValidator {

    @Autowired
    private UserInfoHolder userInfoHolder;

    public boolean isAdmin() {
        return userInfoHolder.isAdmin();
    }

    public boolean isUser() {
        return userInfoHolder.isUser();
    }

}
